package ai.tubes.iris;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;;


public class ResultActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.result);
		
		ai.tubes.iris.knowledge.inferenceengine mesininferensi = new ai.tubes.iris.knowledge.inferenceengine();
		
		((TextView)findViewById(R.id.lbllaringresult)).setText(mesininferensi.InferenceStatus("Laring", GlobalVariable.mLaring));
		((TextView)findViewById(R.id.lbltiroidresult)).setText(mesininferensi.InferenceStatus("Tiroid", GlobalVariable.mTiroid));
		((TextView)findViewById(R.id.lblbronkusresult)).setText(mesininferensi.InferenceStatus("Bronkus", GlobalVariable.mBronkus));
		((TextView)findViewById(R.id.lblappendiksresult)).setText(mesininferensi.InferenceStatus("Appendix", GlobalVariable.mAppendiks));
		((TextView)findViewById(R.id.lblpankreasresult)).setText(mesininferensi.InferenceStatus("Pankreas", GlobalVariable.mPankreas));
		((TextView)findViewById(R.id.lblhatiresult)).setText(mesininferensi.InferenceStatus("Hati", GlobalVariable.mHati));
		((TextView)findViewById(R.id.lblempeduresult)).setText(mesininferensi.InferenceStatus("Empedu", GlobalVariable.mEmpedu));
		((TextView)findViewById(R.id.lblginjalresult)).setText(mesininferensi.InferenceStatus("Ginjal", GlobalVariable.mGinjal));
		((TextView)findViewById(R.id.lbldadaresult)).setText(mesininferensi.InferenceStatus("RonggaDada", GlobalVariable.mDada));
		((TextView)findViewById(R.id.lblparuresult)).setText(mesininferensi.InferenceStatus("Paruparu", GlobalVariable.mParu));
		((TextView)findViewById(R.id.lblbronkialisresult)).setText(mesininferensi.InferenceStatus("Bronchialis", GlobalVariable.mBronkialis));
		((TextView)findViewById(R.id.lbljantungresult)).setText(mesininferensi.InferenceStatus("Jantung", GlobalVariable.mJantung));
		((TextView)findViewById(R.id.lbllimparesult)).setText(mesininferensi.InferenceStatus("Limpa", GlobalVariable.mLimpa));
		((TextView)findViewById(R.id.lblkolonnaikresult)).setText(mesininferensi.InferenceStatus("KolonMenaik", GlobalVariable.mKolonnaik));
		((TextView)findViewById(R.id.lblkolonturunresult)).setText(mesininferensi.InferenceStatus("KolonMenurun", GlobalVariable.mKolonturun));
		((TextView)findViewById(R.id.lblususkecilresult)).setText(mesininferensi.InferenceStatus("UsusKecil", GlobalVariable.mUsusKecil));
		((TextView)findViewById(R.id.lblkolonsigmoidresult)).setText(mesininferensi.InferenceStatus("KolonSigmoid", GlobalVariable.mKolonSigmoid));
		((TextView)findViewById(R.id.lblususbunturesult)).setText(mesininferensi.InferenceStatus("UsusBuntu", GlobalVariable.mUsusBuntu));
		((TextView)findViewById(R.id.lbllambungresult)).setText(mesininferensi.InferenceStatus("Lambung", GlobalVariable.mLambung));
		
		//button close
		mBack	= (Button)findViewById(R.id.buttonback);
		mBack.setOnClickListener(new View.OnClickListener() {
			public void onClick(View arg0) {
				startActivity(new Intent(ResultActivity.this.getApplicationContext(), SolveMenuActivity.class));
			}
		});

		//button feedback
		mFeedback = (Button)findViewById(R.id.buttonFeedback);
		mFeedback.setOnClickListener(new View.OnClickListener(){
			public void onClick(View arg0){
				startActivity(new Intent(ResultActivity.this.getApplicationContext(), FeedbackActivity.class));
			}
		});

	}
	
	private Button mBack, mFeedback;
	
	
}
